<template>
	<view class="wrap yjfk-form-right">
		<image class="bgs" src="https://wuyouzhuanapp.oss-cn-beijing.aliyuncs.com/1.png" mode="widthFix"></image>
		<!-- <headers  title="投诉建议" /> -->
	<view  class="form">
		<u-form :model="model" :rules="rules" ref="uForm" label-position="top">
			
			<u-form-item  :border-bottom="false" label="收款人姓名" prop="name">
				<view class="box box1">
				<u-input  class="input-left-form" placeholder="请输入收款人姓名"
						v-modtel="model.name" type="text" maxlength="200"></u-input>
						</view>
			</u-form-item>
			<u-form-item  :border-bottom="false" label="支付宝账号" prop="alipayNum">
				<view class="box box1">
				<u-input  class="input-left-form" placeholder="请输入支付宝账号"
						v-modtel="model.alipayNum" type="text" maxlength="200"></u-input>
						</view>
			</u-form-item>
			
			
		
			
			
		
		</u-form>
		<view class="u-m-t-80">
			<u-button shape="circle" type="primary" @click="submit">立即保存</u-button>
		</view>
	</view>
	</view>
</template>
<script>
import headers from '@/components/headnavbar/index.vue'
export default {
	
	components: {
		headers
	},
	data() {
		
		return {
			model: {
				
				name: '',
				alipayNum:''
			},
			rules: {
				name: [
					{
						required: true,
						message: '请输入收款人姓名',
						trigger: ['change','blur'],
					}
				],
				alipayNum: [
					{
						required: true,
						message: '请输入支付宝账号',
						trigger: ['change','blur'],
					}
				],

			}
		};
	},
	onReady() {
		this.$refs.uForm.setRules(this.rules);
		
	},
	methods: {
		submit() {
	
			this.$refs.uForm.validate(valid => {
				if (valid) {
					this.$u.api.commentSave(this.model).then(res => {
						uni.showModal({
							title: '提示',
							content: res.message,
							showCancel: false,
							success: function () {
								if (res.result == 'true') {
									uni.navigateBack();
								}
							}
						});
					});
				} else {
					this.$u.toast('您填写的信息有误，请根据提示修正。');
				}
			});
		},
		cancel() {
			uni.navigateBack();
		}
	}
};
</script>
<style lang="scss" scoped>
.input-placeholder{
	text-align: right;
}

.box{
	background: #fff;
	width: 100%;
	padding: 22rpx 31rpx;
	border-radius: 13rpx;
}
.box1{
	padding:10rpx 31rpx;
}
/deep/ .u-input,/deep/ .u-list-item{
	background: #fff !important;
	
}

</style>
